/*  ----------------------------------------------------------------------------
 *  Arello Mobile
 *  Fast 3d Engine
 *  ----------------------------------------------------------------------------
 * Except where otherwise noted, this work is licensed under
 * http://creativecommons.org/licenses/by/3.0
 */
#pragma once

#include <HardwareManager.h>
#include <Creator.h>
#include <filesystem/String.hpp>
#include <noise/hard/Hardware.h>

namespace liba
{
namespace noise
{

class Manager :
	public HardwareManagerNamed<hard::Hardware, filesystem::String>
{
public:
	class Creator : virtual public HardwareManagerNamed<hard::Hardware, filesystem::String>::Creator,
		virtual public liba::Creator
	{
	public:
		Creator();
		~Creator();
		void life_cycle(double delta_time);
	};
	static hard::Hardware * get_hardware();

	// never returns 0
	static hard::Channel * create_immortal_static_channel( const Atom & channel_type, const filesystem::String & name);
	static hard::Channel * create_immortal_streaming_channel( const Atom & channel_type);

	static DataSource * create_datasource(const filesystem::String & name);

	static void make_immortal(hard::Channel * channel);
	static void update_immortal_channels();
};

} // namespace noise
} // namesapce liba
using namespace liba;

